Rewards Analytics and Distribution Dashboard¶

This goal of this notebook is to offer an easy way to process the outputs of the praise and sourcecred reward systems, perform an analysis of the results and calculate the token reward distribution. It uses mock data and should be considered a work-in-progress.

Imports¶

First, we import the relevant libraries, get the Data and set how many tokens we want to distribute

Now that we have selected the files, we can import them for processing. We can also set the total amount of tokens we want to distribute this period. We also set the name we want our output file to have.

Tip: Now that the file paths are set, you can safely click on "Cell > Run all below" from here on the menu bar to execute everything :)

Parameters¶

Set the total amount of tokens we want to distribute this period. We also set the name we want our output file to have.

Results Analysis¶

Let's dive into some data analysis! We'll use the metrics designed and explained by octopus🐙, and focus only on the praise rewards for now. Starting with:

Allocation percentages - Praise receivers¶

This table will show us which percentage of the total rewards gets distributed to which top % of users. So "Top 50% -> 0.85" would mean that the top 50% of praisees received 85% of the total rewards

Out[8]:
Rewards
Top 50% 0.967166
Top 20% 0.793193
Top 10% 0.553922
Top 5% 0.330281
Top 1% 0.120977

Allocation Percentages - Praise givers¶

This table will show us which percentage of the total rewards get distributed based on praise given by which top % of users. So "Top 50% -> 0.85" would mean that 85% of the total rewards are based on praise given by the top 50% praise givers.

Out[10]:
Rewards
Top 50% 0.966611
Top 20% 0.814650
Top 10% 0.713559
Top 5% 0.644932
Top 1% 0.420459

Plotting praise given against praise received¶

Now we can compare the relationship between praise given by a user and the praise they received

Gini coefficient¶

Next we will look at the Gini coefficient. Note that there is some debate if we want to use this metric at all, since it is usually employed to measure wealth distribution, and not compensation.

Out[12]:
Rewards
All 0.733363
Top 50% 0.547062
Top 20% 0.254984

Shannon Entropy¶

Shannon Entropy) is a concept from communications theory, which is also used in measuring the diversity of a distribution. The formula for calculating Shannon Entropy among $n$ individuals is $$\\sum_{k=1}^n -p_k log_2(p_k),$$ where $p_k$ represents the proportion of the resource that user $k$ received.

Here we compare the actual Shannon Entropy with the maximum possible for the dataset, keeping in mind that a Shannon Entropy of 0 would mean one user holds all the rewards

Out[13]:
Rewards
Entropy 5.584338
Max Entropy 7.066089
% of Max 0.790301

Nakamoto Coefficient¶

Last but not least, the Nakamoto coefficient. The Nakamato Coefficient is defined as the smallest number of accounts who control at least 50% of the resource. Although its significance relates to the prospect of a 51% attack on a network, which may not be relevant in our context, we can still use it as an intuitive measure of how many individuals received the majority of a resource.

Out[14]:
13

Praise Data Visualization¶

Rating distribution¶

Since praise gets valued on a scale, we can take a look at how often each value of the scale gets assigned by quantifiers.

Praise Reward Distribution¶

We can also take a look at the distribution of the received praise rewards

Praise Outliers¶

To aid the revision process, we can generate a table which sorts the praise by the size of the spread between the highest and lowest scores. These "controversial" praise instances can then be discussed in the quantifier review call. Index numbers are kept to make localization in the "big praise sheet" easier.

Out[17]:
index ID DATE TO USER ACCOUNT FROM USER ACCOUNT REASON SCORE 1 SCORE 2 SCORE 3 SCORE 4 ... QUANTIFIER 2 USERNAME QUANTIFIER 3 USERNAME QUANTIFIER 4 USERNAME QUANTIFIER 4 ETH ADDRESS AVG SCORE CORRECTION ADD CORRECTION SUB CORRECTION COMMENT FINAL QUANT SPREAD
0 441 621f79e243b89009366c94cb 2021-10-07T22:00:00.000Z Juankbell#7458 iviangita#3204 for putting on all the Graviton curriculum tog... 13 1 144 8 ... divine_comedian#5493 bear100#9085 osycross(🦎🦎)#5943 0xFe99402763531258875949D449db20157b77Ec5C 41 NaN NaN NaN 41 143
1 1561 621f79e343b89009366c9999 2021-10-28T22:00:00.000Z akrtws (TE Academy)#4246 iviangita#3204 for the success of Token Engineering Academy 144 144 8 34 ... Parrachia#0450 Nuggan#5183 Vyvy-vi#5040 0x2fA130927814B590623031e846f059df9554FdDe 82 NaN NaN NaN 82 136
2 661 621f79e243b89009366c95ac 2021-10-09T22:00:00.000Z divine_comedian#5493 griff (💜, 💜)#8888 for working on Sunday in the Params hack sesh ... 89 0 13 0 ... Parrachia#0450 lee0007#8152 Vyvy-vi#5040 0x2fA130927814B590623031e846f059df9554FdDe 51 NaN NaN NaN 51 89
3 494 621f79e243b89009366c9500 2021-10-07T22:00:00.000Z Nuggan#5183 iviangita#3204 for all the work they do in the Params WG: des... 34 21 89 21 ... Maxwe11#7157 bear100#9085 osycross(🦎🦎)#5943 0xFe99402763531258875949D449db20157b77Ec5C 41 NaN NaN NaN 41 68
4 1564 621f79e343b89009366c999c 2021-10-28T22:00:00.000Z r33pich33p#6906 iviangita#3204 for being productive and engaging with Eduardo... 0 5 55 5 ... tigeroid#2951 shawn#7046 enti#1546 0x6897aBe0fD62B589260784B21F4ca3F78A0D8017 21 NaN NaN NaN 21 55
5 178 621f79e243b89009366c93ba 2021-10-01T22:00:00.000Z Juankbell#7458 Mount Manu#3530 for the 2nd Graviton training 🧑🏻‍🚀 13 0 55 0 ... divine_comedian#5493 bear100#9085 osycross(🦎🦎)#5943 0xFe99402763531258875949D449db20157b77Ec5C 17 NaN NaN NaN 17 55
6 1169 621f79e343b89009366c97f6 2021-10-21T22:00:00.000Z eduardovegap#0422 Mount Manu#3530 for their amazing Communitas work around resea... 55 13 0 5 ... Maxwe11#7157 shawn#7046 enti#1546 0x6897aBe0fD62B589260784B21F4ca3F78A0D8017 18 NaN NaN NaN 18 55
7 1189 621f79e343b89009366c980a 2021-10-21T22:00:00.000Z markop#2007 Mount Manu#3530 for all their work and dedication towards the ... 0 55 8 0 ... Maxwe11#7157 Nuggan#5183 enti#1546 0x6897aBe0fD62B589260784B21F4ca3F78A0D8017 21 NaN NaN NaN 21 55
8 1529 621f79e343b89009366c9979 2021-10-28T22:00:00.000Z chuygarcia.eth#6692 iviangita#3204 for the infinite contributions they brought an... 0 55 8 21 ... Parrachia#0450 lee0007#8152 Mike Brunt#0745 0x457Ea659aAAbD496550264c6d9d6351666f2fB4b 28 NaN NaN NaN 28 55
9 1516 621f79e343b89009366c996c 2021-10-28T22:00:00.000Z markop#2007 iviangita#3204 for doing the AMA on the dashboard at Commons ... 0 55 8 5 ... Maxwe11#7157 Nuggan#5183 enti#1546 0x6897aBe0fD62B589260784B21F4ca3F78A0D8017 22 NaN NaN NaN 22 55
10 909 621f79e243b89009366c96a5 2021-10-14T22:00:00.000Z markop#2007 iviangita#3204 for their awesome work in the last weeks on th... 0 55 8 0 ... Maxwe11#7157 Nuggan#5183 enti#1546 0x6897aBe0fD62B589260784B21F4ca3F78A0D8017 21 NaN NaN NaN 21 55
11 14 621f79e243b89009366c930e 2021-09-30T22:00:00.000Z markop#2007 iviangita#3204 for their support in the dashboard app 0 55 0 13 ... Maxwe11#7157 Nuggan#5183 enti#1546 0x6897aBe0fD62B589260784B21F4ca3F78A0D8017 23 NaN NaN NaN 23 55
12 495 621f79e243b89009366c9501 2021-10-07T22:00:00.000Z divine_comedian#5493 iviangita#3204 for all the work they do in the Params WG: des... 55 0 13 0 ... Parrachia#0450 lee0007#8152 Vyvy-vi#5040 0x2fA130927814B590623031e846f059df9554FdDe 34 NaN NaN NaN 34 55
13 168 621f79e243b89009366c93b0 2021-10-01T22:00:00.000Z liviade#1387 Mount Manu#3530 for all the work that she does in the community 🤗 13 1 55 5 ... Mettodo#7010 Zeptimus#3359 eduardovegap#0422 0x1d921dff757610FbDB0073479e12c0a07d382677 18 NaN NaN NaN 18 54
14 1255 621f79e343b89009366c984c 2021-10-22T22:00:00.000Z pKrepe#5682 Mount Manu#3530 for their hard development work in the CCD 2 2 55 144 ... Parrachia#0450 kristofer#1475 Vyvy-vi#5040 0x2fA130927814B590623031e846f059df9554FdDe 50 NaN NaN NaN 50 53
15 649 621f79e243b89009366c95a0 2021-10-08T22:00:00.000Z MsMagey#8357 ALOYSIOUS#3049 for her dedication to learning with the gravit... 55 3 13 8 ... Tam2140#9361 shawn#7046 eduardovegap#0422 0x1d921dff757610FbDB0073479e12c0a07d382677 19 NaN NaN NaN 19 52
16 1352 621f79e343b89009366c98ad 2021-10-25T22:00:00.000Z RodriCastillo#1415 chuygarcia.eth#6692 for his amazing designs for Params Parties, wh... 21 3 55 21 ... Tam2140#9361 bear100#9085 bends#3537 0x1E975f53956d644868F3eA25690b1bbEda658565 25 NaN NaN NaN 25 52
17 1252 621f79e343b89009366c9849 2021-10-22T22:00:00.000Z Vitor Marthendal#0090 Mount Manu#3530 for their hard development work in the CCD 3 5 55 8 ... Mettodo#7010 kristofer#1475 eduardovegap#0422 0x1d921dff757610FbDB0073479e12c0a07d382677 17 NaN NaN NaN 17 52
18 501 621f79e243b89009366c9507 2021-10-07T22:00:00.000Z akrtws (TE Academy)#4246 iviangita#3204 for the support Livia feels in your presence a... 5 55 8 5 ... Parrachia#0450 Nuggan#5183 Vyvy-vi#5040 0x2fA130927814B590623031e846f059df9554FdDe 18 NaN NaN NaN 18 50
19 1360 621f79e343b89009366c98b8 2021-10-26T22:00:00.000Z sem 🐝#0161 liviade#1387 for spotting a mistake on Gitbook and being pr... 13 5 55 5 ... Tam2140#9361 shawn#7046 bends#3537 0x1E975f53956d644868F3eA25690b1bbEda658565 19 NaN NaN NaN 19 50
20 765 621f79e243b89009366c9615 2021-10-13T22:00:00.000Z Vitor Marthendal#0090 divine_comedian#5493 for development on the CCD 21 5 55 13 ... Mettodo#7010 kristofer#1475 eduardovegap#0422 0x1d921dff757610FbDB0073479e12c0a07d382677 23 NaN NaN NaN 23 50
21 1562 621f79e343b89009366c999a 2021-10-28T22:00:00.000Z solsista#5370 iviangita#3204 for being our ethics guardian 5 55 5 13 ... Parrachia#0450 lee0007#8152 osycross(🦎🦎)#5943 0xFe99402763531258875949D449db20157b77Ec5C 19 NaN NaN NaN 19 50
22 1178 621f79e343b89009366c97ff 2021-10-21T22:00:00.000Z liviade#1387 Mount Manu#3530 for her leadership in governance & in Soft Gov 13 5 55 8 ... Mettodo#7010 Zeptimus#3359 eduardovegap#0422 0x1d921dff757610FbDB0073479e12c0a07d382677 20 NaN NaN NaN 20 50
23 266 621f79e243b89009366c9412 2021-10-01T22:00:00.000Z karmaticacid#1218 Mount Manu#3530 for their leadership🧙🏻 🧙🏻‍♂️ 🧙🏻‍♀️ 21 55 5 5 ... Parrachia#0450 bear100#9085 eduardovegap#0422 0x1d921dff757610FbDB0073479e12c0a07d382677 21 NaN NaN NaN 21 50
24 1549 621f79e343b89009366c998d 2021-10-28T22:00:00.000Z karmaticacid#1218 iviangita#3204 for working on something that makes everyone i... 8 55 5 13 ... Parrachia#0450 bear100#9085 eduardovegap#0422 0x1d921dff757610FbDB0073479e12c0a07d382677 20 NaN NaN NaN 20 50

25 rows × 29 columns

We can also plot the spread against the average score for a more visual search.
ATTENTION! Keep in mind that this is just meant as a visual aid. If there are several praise instances with similar spread and average quant number, all but one end up "hidden" on the chart. For the full list you have to use the table.

Praise Flows¶

Now for something more fun: let's surface the top "praise flows" from the data. Thanks to @inventandchill for this awesome visualization! On one side we have the top 20 praise givers separately (modifiable by changing the variable n_senders), on the other the top 25 receivers (modifiable by changing the variable n_receivers). The people outside the selection get aggregated into the "REST FROM" and "REST TO" categories.

Out[20]:

SourceCred Data¶

SourceCred token Distribution¶

Next we can see the distribution made by the SourceCred algorithm.

Quantifier Data¶

Let's take a closer look at each quantifier. In the following step we will use the raw praise data to zoom in on how each quantifier scored the praises:

Amount of praise quantified¶

With the above table we can easily see how much praise each quantifier rated.

Mean praise score by quantifier¶

Let's see the mean praise scores every quantifier gave.

Total Token Distribution Visualization and Export¶

To send the allocations to the DAO for distribution, we need to put all data together and add the rewards for the reward board and the quantifiers.

Let's take a final look at the total distribution. Click on the legend to filter out specific reward sources

That's it! We can now download the final distribution files and upload them to GitHub for future reference. We want to export 3 different files:
 - The final reward allocations, separated by source
 - The final reward allocations, in a disperse.app-readable format
 - The extended praise data, detailing the how many tokens each single praise netted (for future reference)